/*
  ==============================================================================

  This is an automatically generated file created by the Jucer!

  Creation date:  9 Jun 2008 12:01:05 pm

  Be careful when adding custom code to these files, as only the code within
  the "//[xyz]" and "//[/xyz]" sections will be retained when the file is loaded
  and re-saved.

  Jucer version: 1.11

  ------------------------------------------------------------------------------

  The Jucer is part of the JUCE library - "Jules' Utility Class Extensions"
  Copyright 2004-6 by Raw Material Software ltd.

  ==============================================================================
*/

#ifndef __JUCER_HEADER_FILEDROPTARGETCOMPONENT_FILEDROPTARGETCOMPONENT_9650B8EC__
#define __JUCER_HEADER_FILEDROPTARGETCOMPONENT_FILEDROPTARGETCOMPONENT_9650B8EC__

//[Headers]     -- You can add your own extra header files here --
#include "UploadThread.h"
#include "KetonalConfig.h"
#include "CircularProgress.h"
#include "juce.h"
//[/Headers]



//==============================================================================
/**
                                                                    //[Comments]
    An auto-generated component, created by the Jucer.

    Describe your class and how it works here!
                                                                    //[/Comments]
*/
class FileDropTargetComponent  : public Component,
                                 public FileUploadListener,
                                 public ButtonListener
{
public:
    //==============================================================================
    FileDropTargetComponent (KetonalConfig *_c);
    ~FileDropTargetComponent();

    //==============================================================================
    //[UserMethods]     -- You can add your own custom methods in this section.
	void mouseOver();
	void mouseOut();
	void uploadFiles (StringArray f);
	int uploadProgressCallback (double dltotal, double dlnow, double ultotal, double ulnow);
	void uploadEnded (bool f, String s);
	void mouseDrag (const MouseEvent& e);
	void mouseDown (const MouseEvent& e);
	void savePosition();
    //[/UserMethods]

    void paint (Graphics& g);
    void resized();
    void buttonClicked (Button* buttonThatWasClicked);

    // Binary resources:
    static const char* iPhone_blank_8_png;
    static const int iPhone_blank_8_pngSize;
    static const char* stop_png;
    static const int stop_pngSize;
    static const char* blank_png;
    static const int blank_pngSize;

    //==============================================================================
    juce_UseDebuggingNewOperator

private:
    //[UserVariables]   -- You can add your own custom variables in this section.
	ComponentDragger myDragger;
	KetonalConfig *config;
	CircularProgress *progress;
	double progressPercent;
	UploadThread *uploadThread;
	uint32 tNow, tPrev;
	double ulPrev;
    //[/UserVariables]

    //==============================================================================
    Label* kbpsLabel;
    Label* configName;
    ImageButton* stopButton;
    Image* internalCachedImage1;
    Image* internalCachedImage2;

    //==============================================================================
    // (prevent copy constructor and operator= being generated..)
    FileDropTargetComponent (const FileDropTargetComponent&);
    const FileDropTargetComponent& operator= (const FileDropTargetComponent&);
};


#endif   // __JUCER_HEADER_FILEDROPTARGETCOMPONENT_FILEDROPTARGETCOMPONENT_9650B8EC__
